import { Directive,Input,TemplateRef,ViewContainerRef } from '@angular/core';

@Directive({
  selector: '[ngHide]'
})
export class StcDirecDirective {
  @Input('ngHide')
  set condition(newCondition:Boolean){
      if(!newCondition){
          this.ViewContainerRef.createEmbeddedView(this.TemplateRef)
      }else{
        this.ViewContainerRef.clear()
      }
  }


  constructor(private TemplateRef:TemplateRef<any>,private ViewContainerRef:ViewContainerRef) { }

}
